<include file="Public/min-header"/>

<link href="__PUBLIC__/plugins/daterangepicker/daterangepicker-bs3.css" rel="stylesheet" type="text/css" />
<script src="__PUBLIC__/plugins/daterangepicker/moment.min.js" type="text/javascript"></script>
<script src="__PUBLIC__/plugins/daterangepicker/daterangepicker.js" type="text/javascript"></script>

<div class="wrapper">
    <include file="Public/breadcrumb"/>
    <section class="content" style="padding:0px 15px;">
        <!-- Main content -->
        <div class="container-fluid">
            <div class="pull-right">
                <a href="javascript:history.go(-1)" data-toggle="tooltip" title="" class="btn btn-default" data-original-title="返回"><i class="fa fa-reply"></i></a>
            </div>
            <div class="panel panel-default">
                <div class="panel-body ">
                    <ul class="nav nav-tabs">
                        <foreach name="group_list" item="vo" key="k">
                            <li <if condition="$k eq 'index_msg'">class="active"</if>><a href="javascript:void(0)" data-url="{:U('System/index',array('inc_type'=>$k))}" data-toggle="tab" onclick="goset(this)">{$vo}</a></li>
                        </foreach>
                    </ul>
                    <!--表单数据-->
                    <form method="post" id="handlepost" action="{:U('System/handle')}">
                        <!--通用信息-->
                        <div class="tab-content" style="padding:20px 0px;">
                            <div class="tab-pane active" id="tab_tongyong">
                                <table class="table table-bordered">
                                    <tbody>
                                    <tr>
                                        <td class="col-sm-2">标题：</td>
                                        <td class="col-sm-8">
                                            <input type="text" class="form-control" name="index_msg_title" value="{$config.index_msg_title}" >
                                            <span id="err_index_msg_title" style="color:#F00; display:none;"></span>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="col-sm-2">链接：</td>
                                        <td class="col-sm-8">
                                            <input type="text" class="form-control" name="index_msg_link" value="{$config.index_msg_link}" >
                                            <span id="err_index_msg_link" style="color:#F00; display:none;"></span>
                                        </td>
                                    </tr>

                                    <tr>
                                        <td>启用：</td>
                                        <td>
                                            <input id="turnOn" type="radio" class="" name="index_msg_status" <if condition="$config['index_msg_status'] eq 1">checked</if> value="1" >是
                                            <input type="radio"  class="" name="index_msg_status" <if condition="$config['index_msg_status'] eq 0">checked</if> value="0" >否
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>图片：</td>
                                        <td>
                                            <input type="button" class="button" onClick="GetUploadify(1,'index_msg_img','logo','')"  value="上传图片"/>
                                            <input type="text" id="index_msg_img" class="input-sm" name="index_msg_img" value="{$config.index_msg_img}" >
                                            <if condition="$config['index_msg_img'] neq null">
                                                &nbsp;&nbsp;
                                                <a target="_blank" href="{$config.index_msg_img}"  >
                                                    <img width="25" height="25" src="/Public/images/image_icon.jpg">
                                                </a>
                                            </if>
                                        </td>
                                    </tr>




                                    </tbody>
                                    <tfoot>
                                    <tr>
                                        <td><input type="hidden" name="inc_type" value="{$inc_type}"></td>
                                        <td class="text-right"><input class="btn btn-primary" type="button" onclick="adsubmit()" value="保存"></td></tr>
                                    </tfoot>
                                </table>
                            </div>
                        </div>
                    </form><!--表单数据-->
                </div>
            </div>
        </div>
    </section>
</div>
<script>
    function adsubmit(){
        /*
         var site_url = $('input[name="site_url"]').val();
         var urlReg = /^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\w \.-]*)*$/;
         if(!urlReg.exec(site_url))
         {
         alert('网站域名格式必须是 http://www.xxx.com');
         return false;
         }
         */
        $('#handlepost').submit();
    }

    $(document).ready(function(){
        //get_province();
    });

    function goset(obj){
        window.location.href = $(obj).attr('data-url');
    }
</script>
</body>
</html>